<script type="text/javascript">
	$(function() {
		$("#checkAll").checkall({itemName: "object"});
	});
	
	$(document).ready(function(){
		 fileUpload.swfupload("file_upload", {
			formData: {
				"bucketName": _bucketName,
				"path": _path
			},
			onUploadStart: function(file) {
				var formData = $("#file_upload").uploadify("settings", "formData");
				formData.path = _path;
				$("#file_upload").uploadify("settings", "formData", formData, true);
			}
		}); 
		fileUpload.swfupload("folder_upload", {
			data: {
				bucketName: _bucketName,
				path:_path
			}
		});
	})
</script>
<a class="btn btn-primary" href="javascript:void(0);" onclick="netdisk.createFolder();">创建文件夹</a>

<input type="file" name="file_upload" id="file_upload" />
<input type="file" name="folder_upload" id="folder_upload" />

<a class="btn btn-primary" href="javascript:void(0);" onclick="netdisk.up();">↑</a>
<a class="btn btn-primary" href="javascript:void(0);" onclick="netdisk.home();">主页</a>
<label id="location"></label>


<!-- <a class="btn btn-primary" href="javascript:void(0);" onclick="netdisk.share();">分享</a> -->
<a class="btn btn-primary" href="javascript:void(0);" onclick="netdisk.download();">下载</a>
<a class="btn btn-primary" href="javascript:void(0);" onclick="netdisk.logicalRemove();">删除</a>
<a class="btn btn-primary" href="javascript:void(0);" onclick="netdisk.move();">移动</a>
<a class="btn btn-primary" href="javascript:void(0);" onclick="netdisk.copy();">复制</a>
<!-- <a class="btn btn-primary" href="javascript:void(0);" onclick="netdisk.rename();">重命名</a> -->
<table id="objectList" class="table table-striped table-hover">
	<thead>
		<tr>
			<th width="3%" scope="col"><input
				id="checkAll" name="" type="checkbox" /></th>
			<th width="22%" scope="col">名称</th>
			<th width="22%" scope="col">大小</th>
			<th width="22%" scope="col">修改日期</th>
			<th width="22%" scope="col">权限管理</th>
		</tr>
	</thead>
	<tbody>
		<#list list as item>
		<tr <#if ((item_index+1) % 2 == 0) >class="oddrow"</#if>>
			<td class="c"><input name="object" type="checkbox" value="${item.name}" /></td>
	        <td>
	        	<#if item.type == "folder" > <a class="btn btn-primary" href="javascript:void(0);" 
					onclick="netdisk.nextList('${item.name}')">${item.name}</a></#if>
				 <#if item.type == "file" > ${item.name}</a> </#if> 
			</td>
	        <td>${item.sizeWithUnit}</td>
	        <td>${item.lastModified}</td>
	        <td>...</td>
	    </tr>
		</#list>
	</tbody>
</table>
